package com.tj.api.rest.account.requset;

import com.fqgj.common.utils.StringUtils;
import com.fqgj.exception.common.ApplicationException;

import java.math.BigDecimal;

/**
 * Created with IntelliJ IDEA.
 * User: anonymous
 * Date: 2020/06/11
 * Time: 下午2:16
 */
public class DepositRequest {
    private String depositAmountCode;
    private BigDecimal amount;
    private int channelCode;

    public String getDepositAmountCode() {
        return depositAmountCode;
    }

    public void setDepositAmountCode(String depositAmountCode) {
        this.depositAmountCode = depositAmountCode;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public int getChannelCode() {
        return channelCode;
    }

    public void setChannelCode(int channelCode) {
        this.channelCode = channelCode;
    }

    public void verify() {
        if (StringUtils.isEmpty(depositAmountCode)) {
            throw new ApplicationException("Please select");
        }
        if (channelCode == 0) {
            throw new ApplicationException("Please select");
        }
    }
}